//
// Created by Lenovo on 2025/7/3.
//

#include "Calculator.h"
#include <android/log.h>

Calculator* Calculator::instance = nullptr;

Calculator *Calculator::getCalc() {
    if (instance == nullptr) {
        instance = new Calculator();
    }
    return instance;
}

Calculator::Calculator() {
    p_math = new Math();
}

Calculator::~Calculator() {
    if (p_math) {
        delete p_math;
    }
}

int Calculator::sum(int a, int b) {
    return p_math->sum(a, b);
}

int Calculator::minus(int a, int b) {
    return p_math->minus(a, b);
}

